package kr.hkit.powerjava.chapter06.work2class;

public class Ifwork01 {

	private int n, price;

	public Ifwork01() {
	
	}
	
	public Ifwork01(int n) {
		this.n = n;
	}

	public int discout() {
		
		if (n >=100){
			price = (int) (n*100*0.8);
		}else{
			if (n>=20) {
				price = (int) (n*100*0.85);
			}else {
				if (n >=10) {
					price = (int) (n*100*0.9);
				}else {
					price = n * 100;
				}
			}
		}
		return price; // ??
	}

	@Override
	public String toString() {
		return "Forwork01 [가격은=" + discout() + "]";
	}

}
